#ifndef PREFERENCE_H
#define PREFERENCE_H
#include "dtlibrary.h"
#include <QString>
#include <QSet>
#include <QWidget>

static const QString preferenceFile = "wouaf.xml";

class Preference : public QWidget
{
private:
    QSet<DtLibrary> library;
    static Preference *instance;
    static QMap<int, bool> artistHeaderName;
    static QMap<int, bool> artistHeaderPlay;
    static QMap<int, bool> artistHeaderAdd;
    static QMap<int, bool> artistHeaderHeart;
protected:
    Preference(QWidget *parent = 0);
    void createDefaultFile();
    void getPreferences();
public:
    static Preference *getInstance();
    QSet<DtLibrary> getLibrary() const;
    void addLibrairy(const QStringList &location);
    static void changeOrderHeaderArtist(QList<QMap<int, int> > newOrder);
    static QList<QMap<int, int> > getOrderHeaderArtist();
signals:
    void orderHeaderArtistChanged(QList<QMap<int, int> > &);
};

#endif // PREFERENCE_H
